package no.rodland.acc.interceptors;

import com.opensymphony.xwork2.ActionInvocation;
import com.opensymphony.xwork2.interceptor.Interceptor;

/**
 *
 */
public class LogoutInterceptor implements Interceptor {
    private static final long serialVersionUID = 1725350098838919650L;

    @Override
    public void destroy() {
    }

    @Override
    public void init() {
    }

    @Override
    public String intercept(ActionInvocation invocation) throws Exception {
        invocation.getInvocationContext().getSession().remove(SessionInterceptor.LOGGED_IN);
        return invocation.invoke();
    }
}
